<!DOCTYPE html>
<html>
{include file="public/head"}

<body>
    {include file="public/nav"} {include file="public/nav-2"}
    <div class="layui-container">
        <div class="layui-row layui-col-space15">
            <div class="fly-panel-title" style="text-align: center;">
                <h1>搜索结果</h1>
            </div>
            <div style="text-align: center;">
                {$page}
            </div>
            <div class="fly-panel" style="margin-bottom: 0;">
                <table class="layui-table" lay-even lay-skin="nob">
                        <colgroup>
                            <col width="60">
                            <col width="60">
                            <col width="90">
                            <col width="250">
                            <col>
                            <col width="150">
                            <col width="250">
                        </colgroup>
                        <thead>
                            <tr class="layui-bg-black"  style="text-align: center;">
                                <th>通过</th>
                                <th>题号</th>
                                <th  style="text-align: center;">题目难度</th>
                                <th  style="text-align: center;">标题</th>
                                <th style="text-align: center">分类</th>
                                <th style="text-align: center">通过率</th>
                                <th style="text-align: center">来源</th>
                            </tr>
                        </thead>
                        <tbody class="problem-list">
                            {foreach name="list" item="v" key="k"} {if condition="($v.defunct=='N'||$power==true)"}
                            <tr>
                                <td >
                                    {if condition="($v.defunct=='Y'&&$power==true)"}
                                    <button class="layui-btn layui-btn-xs layui-btn-normal show_problem" id="{$v.problem_id}">显示</button>
                                    {/if} {eq name="v.result" value="0"}<i class="layui-icon" style="font-size: 25px; color: #5FB878;">&#xe618;</i> {/eq} {eq name="v.result" value="1"}<i class="layui-icon" style="font-size: 25px; color: #FF5722;">&#xe69c;</i> {/eq}
                                </td>
                                <td  style="text-align: center">
                                    {$v.problem_id}
                                </td>
                                <td style="text-align: center">
                                    {$v.score}
                                </td>
                                <td  style="text-align: center;">
                                    <h3>
                                            <a href="{:url('web/Problem/problem','pid='.$v['problem_id'])}" class="fly-link fly-joinad">{$v.title}</a>
                                        </h3>
                                </td>
                                <td>
                                    <div class="display_tag" style="text-align: center;">
                                        {if condition="isset($tag_lists[$v.problem_id])"}
                                    {volist name="tag_lists[$v.problem_id]" id="vo" key="kk" empty=""}
                                    <a href="{:url('web/classify/index',['tid'=>$vo.tag_id])}" class="layui-badge layui-bg-blue">{$vo.tag_name}</a>
                                    {/volist}
                                    {/if}
                                    </div>
                                </td>
                                <td style="text-align: center;">
                                    {if condition="$v.accepted==0"} 0% {else /} {:number_format($v.accepted/$v.submit*100, 0)}% {/if} &nbsp;({$v.accepted}/{$v.submit})
                                </td>
                                <td style="text-align: center;"><a href="{:url('web/problem/searchproblem',['source'=>$v.source])}" class="fly-link">{$v.source}</a>
                                </td>
                            </tr>
                            {/if} {/foreach}
                        </tbody>
                    </table>
            </div>
            <div style="text-align: center;">
                {$page}
            </div>
        </div>
    </div>
    {include file="public/foot"}
</body>

</html>